<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {margin: 0;padding: 0}
    </style>
</head>
<body>
    <div id="app">
        {{rq | dateFilter}}
    </div>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
<script src="../../js/vue.js"></script>
<script>
    Vue.config.productionTip=false;
    Vue.filter("dateFilter",(value)=>{
        return moment(value).format("YYYY-MM-DD HH:mm:ss")
    })
    new Vue({
        el:"#app",
        data:{
            rq:Date.now()
        },
        /*filters:{
            dateFilter(value){
                //value:rq的值
                //日期格式化的库
                return moment(value).format("YYYY-MM-DD HH:mm:ss")
            }
        }*/
    })
</script>
</html>